package com.ldu.houserent.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ldu.houserent.common.base.BaseService;
import com.ldu.houserent.common.vo.HouseSearchVO;
import com.ldu.houserent.entity.House;

import java.util.List;

/*
    房屋服务接口
 */
public interface HouseService extends BaseService<House,Long> {

    /*
        根据用户id和房产证编号查询合租房屋
     */
    List<House> findByUserIdAndCetificateNoAndRentType(Long userId,String cetificateNo,String rentType);

    /*
        根据出租类型获取最新的n条房屋信息
     */
    List<House> findTopList(String rentType,Integer limit);

    /*
        获得房屋分页数据
     */
    Page<House> getHousePage(HouseSearchVO houseSearchVO,Page<House> page);
}
